── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(rgdal)
필요한 패키지를 로딩중입니다: sp
Please note that rgdal will be retired during 2023,
plan transition to sf/stars/terra functions using GDAL and PROJ
at your earliest convenience.
See https://r-spatial.org/r/2022/04/12/evolution.html and https://github.com/r-spatial/evolution
rgdal: version: 1.6-6, (SVN revision 1201)
Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runtime: GDAL 3.5.2, released 2022/09/02
Path to GDAL shared files: C:/Users/sungi/AppData/Local/R/win-library/4.2/rgdal/gdal
GDAL binary built with GEOS: TRUE
Loaded PROJ runtime: Rel. 8.2.1, January 1st, 2022, [PJ_VERSION: 821]
Path to PROJ shared files: C:/Users/sungi/AppData/Local/R/win-library/4.2/rgdal/proj
PROJ CDN enabled: FALSE
Linking to sp version:1.6-0
To mute warnings of possible GDAL/OSR exportToProj4() degradation,
use options("rgdal_show_exportToProj4_warnings"="none") before loading sp or rgdal.
library(plotly)
다음의 패키지를 부착합니다: 'plotly'
The following object is masked from 'package:ggplot2':
last_plot
The following object is masked from 'package:stats':
filter
The following object is masked from 'package:graphics':
layout
library(ggtext)library(tmap)
Load data
Following data is geographic data for Chungcheongnam-do.
Warning: OGR support is provided by the sf and terra packages among others
Warning: OGR support is provided by the sf and terra packages among others
Warning: OGR support is provided by the sf and terra packages among others
Warning: GDAL support is provided by the sf and terra packages among others
Warning: GDAL support is provided by the sf and terra packages among others
Warning: GDAL support is provided by the sf and terra packages among others
Warning: OGR support is provided by the sf and terra packages among others
Warning: OGR support is provided by the sf and terra packages among others
Warning: OGR support is provided by the sf and terra packages among others
Warning: OGR support is provided by the sf and terra packages among others
OGR data source with driver: ESRI Shapefile
Source: "C:\trainsets_2\LSMD_ADM_SECT_UMD_충남\LSMD_ADM_SECT_UMD_44.shp", layer: "LSMD_ADM_SECT_UMD_44"
with 316 features
It has 5 fields
Warning: GDAL support is provided by the sf and terra packages among others
Warning: GDAL support is provided by the sf and terra packages among others
Warning: GDAL support is provided by the sf and terra packages among others
data <-read.csv("C:/trainsets_2/GEOCOMPS.csv")data_sf <- data %>%mutate(평단가 = (거래금액/전용면적) %>%as.integer()) %>%st_as_sf(coords =c("Longitude","Latitude"))st_crs(data_sf) <-4737st_crs(data_sf)
Coordinate Reference System:
User input: EPSG:4737
wkt:
GEOGCRS["Korea 2000",
DATUM["Geocentric datum of Korea",
ELLIPSOID["GRS 1980",6378137,298.257222101,
LENGTHUNIT["metre",1]]],
PRIMEM["Greenwich",0,
ANGLEUNIT["degree",0.0174532925199433]],
CS[ellipsoidal,2],
AXIS["geodetic latitude (Lat)",north,
ORDER[1],
ANGLEUNIT["degree",0.0174532925199433]],
AXIS["geodetic longitude (Lon)",east,
ORDER[2],
ANGLEUNIT["degree",0.0174532925199433]],
USAGE[
SCOPE["Horizontal component of 3D system."],
AREA["Republic of Korea (South Korea) - onshore and offshore."],
BBOX[28.6,122.71,40.27,134.28]],
ID["EPSG",4737]]
Warning in RColorBrewer::brewer.pal(N, "Set2"): minimal value for n is 3, returning requested palette with 3 different levels
Warning in RColorBrewer::brewer.pal(N, "Set2"): minimal value for n is 3, returning requested palette with 3 different levels